package com.zhiche.lisa.oms.service.impl;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.zhiche.lisa.oms.dao.mapper.OrderItemMapper;
import com.zhiche.lisa.oms.dao.model.OrderItem;
import com.zhiche.lisa.oms.service.IOrderItemService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 订单货物明细 服务实现类
 * </p>
 *
 * @author qichao
 * @since 2018-06-18
 */
@Service
public class OrderItemServiceImpl extends ServiceImpl<OrderItemMapper, OrderItem> implements IOrderItemService {

    /**
     * 根据来源唯一键查询货物订单明细
     *
     * @param itemSourceKey
     */
    @Override
    public OrderItem queryOrderItem(String itemSourceKey) {
        OrderItem cn = null;
        if (itemSourceKey != null) {
            cn =baseMapper.selectByItemSourceKeyNoTenant(itemSourceKey);
        }
        return cn;
    }

    @Override
    public List<OrderItem> orderItemListByCustomerOrderId(String customerOrderId) {
        return baseMapper.orderItemListByCustomerOrderIdNoTenant(customerOrderId);
    }

}
